package com.ctshk.rpc.hotel.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.ctshk.common.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 酒店产品
 * </p>
 *
 * @author yinhuan
 * @since 2021-03-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "t_hotel_product",autoResultMap = true)
@ApiModel(value="HotelProduct对象", description="酒店产品")
public class HotelProduct extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "产品来源")
    private Integer sourceType;

    @ApiModelProperty(value = "所属酒店")
    private Long hotelId;

    @ApiModelProperty(value = "所属房型")
    private Long roomId;

    @ApiModelProperty(value = "产品编号")
    private String productNumber;

    @ApiModelProperty(value = "产品名称")
    private String name;

    @ApiModelProperty(value = "是否含早")
    private Integer hasBreakfast;

    @ApiModelProperty(value = "供应商ID")
    private Long supplierId;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "负责人ID")
    private Long chargeId;

    @ApiModelProperty(value = "负责人名称")
    private String chargeUser;

    @ApiModelProperty(value = "适用人群ID")
    private Long targetPopulationId;

    @ApiModelProperty(value = "适用人群")
    private String targetPopulation;

    @ApiModelProperty(value = "允许自由行打包")
    private Integer allowPackage;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "酒店主题JSON")
    private String themeJson;

    @ApiModelProperty(value = "定时开售起始")
    private LocalDate saleBegin;

    @ApiModelProperty(value = "定时开售截至")
    private LocalDate saleEnd;

    @ApiModelProperty(value = "开售时间类型")
    private Integer saleTimeType;

    @ApiModelProperty(value = "是否二次确认")
    private Integer isSecCheck;

    @ApiModelProperty(value = "预订须知")
    private String customerNotice;

    @ApiModelProperty(value = "取消政策")
    private Integer allowRefund;

    @ApiModelProperty(value = "预订服务费类型")
    private Integer reserveChargeType;

    @ApiModelProperty(value = "中旅退改手续费类型")
    private Integer refundChargeType;

    @ApiModelProperty(value = "预订服务费")
    private BigDecimal reserveCharge;

    @ApiModelProperty(value = "中旅退改手续费")
    private BigDecimal refundCharge;

    @ApiModelProperty(value = "付款状态")
    private Integer paymentStatus;

    @ApiModelProperty(value = "预订状态")
    private Integer scheduledStatus;

    @ApiModelProperty(value = "取消状态")
    private Integer cancelStatus;

    @ApiModelProperty(value = "产品类型")
    private Integer productType;

    @ApiModelProperty(value = "来源")
    private Integer source;

    @ApiModelProperty(value = "税费及其它费用")
    private BigDecimal taxation;

    @ApiModelProperty(value = "产品状态")
    private Integer status;

    @ApiModelProperty(value = "最低价")
    private BigDecimal minPrice;

    @ApiModelProperty(value = "创建人")
    private Long createId;

    @ApiModelProperty(value = "修改人")
    private Long modifiedId;

    @ApiModelProperty(value = "删除标识")
    private Integer isDeleted;

    @ApiModelProperty(value = "审批状态")
    private Integer approvalStatus;

    @ApiModelProperty(value = "售卖状态(1.有效，0无效)")
    private Integer saleStatus;

    @ApiModelProperty(value = "推荐状态(0：不推荐 1：推荐)")
    private Integer isRecommend;

    @ApiModelProperty(value = "推荐时间")
    private LocalDateTime recommendTime;

    @ApiModelProperty(value = "上架状态（1：上架  2：下架） 数据库待添加")
    private Integer onShelfStatus;

    @ApiModelProperty(value = "保存一个产品code，用来与长隆productCode关联")
    private String productCode;

    //待确认是否加一个供应商

//    @ApiModelProperty(value = "立即确认")//原型有这个字段，但是数据库没有
//    private Integer checkNow;

//    @ApiModelProperty(value = "预订确认")//原型有这个字段，但是数据库没有  立即确认/二次确认
//    private Integer reservationComfrim;
}
